package com.example.designmode.demos.responsibilityChain.conf;

import com.example.designmode.demos.responsibilityChain.handler.GeneralManager;
import com.example.designmode.demos.responsibilityChain.handler.GroupLeader;
import com.example.designmode.demos.responsibilityChain.handler.ProjectLeader;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName: ResponsibilityChainConf
 * @Description:
 * @Date 2024/04/15 14:16
 * @Author songshaoqiu
 **/
@Configuration
public class ResponsibilityChainConf {

    @Bean
    public GeneralManager generalManager(){
       return  new GeneralManager(null, 10);
    }

    @Bean
    public ProjectLeader projectLeader(GeneralManager generalManager){
        return  new ProjectLeader(generalManager, 3);
    }

    @Bean
    public GroupLeader groupLeader(ProjectLeader projectLeader){
        return  new GroupLeader(projectLeader, 1);
    }
}
